package org.example.y24.m11;

import java.util.Scanner;

public class MainD {
    public static void main(String[] args) {
        int n = new Scanner(System.in).nextInt();
        int[][] arr = new int[n][n];
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= i; j++) {
                if (j == 1 || j == i) {
                    arr[i - 1][j - 1] = 1;
                } else {
                    arr[i - 1][j - 1] = arr[i - 2][j - 2] + arr[i - 2][j - 1];
                }
            }
        }
        for (int i = 0;i < n; i++) {
            for (int j = 0;j < i; j++) {
                System.out.printf("%5d", arr[i][j]);
            }
            System.out.println();
        }
    }
}
